feat(hotas): Refactor HOTAS to support variants - #170
Conversation
- Added an "Omni Stick" or a Joystick with an Angle, based on existing models - Left and Right variants combined - Supports HOSAS, HOTAS, and Single stick variants - Supports Now 3 Axis of input per device - Allows Customization of Input directions incase swapping sides
| var existing_settings = save_settings() | ||
| existing_settings[setting_name] = value | ||
| load_settings(existing_settings) | ||
| on_settings_update.emit() |
There was a problem hiding this comment.
Instead of creating a new signal for the updates, can you just call _on_settings_update() from an overridden version of this function?
There was a problem hiding this comment.
Will give it a shot; Had it like this as it was not that clear that I could do such when i wrote it
There was a problem hiding this comment.
Yeah thats a much more elegant solution, not sure why I completely missed the fact that I could override it, completely not used GDScript at all. reverted the Mod_Base.gd and just overwrote the setting function
There was a problem hiding this comment.
class_name in mods itself is not problematic but mods loaded at runtime can't refer to other mod scripts defined with a global class name, nor can you statically type variables holding types from mods. See also: godotengine/godot#98985
As such I recommend removing all uses of class_name and fixing resulting errors from the identifier not being found, and either removing the type altogether or using a known non-mod super type (for example Node3D or Mod_Base). You could also add the intended type name as a comment.
I also think there might be an issue with preload. It may have to be replaced with load.
Would it be possible for you to test your PR by exporting the project and then running the exported version and ensure all aspects of the mod still work?
|
It also looks like the assets for this mod, combined, are quite large, somewhere around 100MB for the released version. Here's my current thoughts:
|
Since the addition of UIDs, this may not be 100% true any longer.
|
What I think is happening now is that scripts now also have a UID and perhaps referencing them in scene files registers them appropriately: [ext_resource type="Script" uid="uid://lwu6r6cpya84" path="res://Mods/HOTAS/HOTAS.gd" id="1_spc0m"]
[ext_resource type="Script" uid="uid://cw34v07h3wecw" path="res://Mods/HOTAS/DeviceSlot.gd" id="2_flrom"]If I had to guess there might still be issues where script are purely referenced by name and never mentioned/defined in a scene file, but who knows? |
Uh oh!
There was an error while loading. Please reload this page.